import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);


export const store = new Vuex.Store({
    state:{
        login: false,
        imgFile:""
    },
    getters:{
        login: state=>{
            return state.login
        },
        imgFile: state=>{
            return state.imgFile
        }
    },
    mutations:{
        checkImgFile:(state,payload)=>{
            state.imgFile = payload
        },
        checkLogin:(state,payload)=>{
            // state.login = payload
            state.login=true
           
        }
    },
    actions:{
        checkLogin: ({commit},payload)=>{ 
            commit('checkLogin',payload)
        },
        checkImgFile: ({commit},payload)=>{
            commit('checkImgFile',payload)
        }
    }
})
